export default function(sequelize, DataTypes) {
  return sequelize.define('manager', {
    _account: {
      type: DataTypes.STRING(15),
      allowNull: false,
      primaryKey: true
    },
    _password: {
      type: DataTypes.STRING(40),
      allowNull: true
    },
    _role: {
      type: DataTypes.BIGINT,
      allowNull: false,
      defaultValue: 0,
      primaryKey: true,
      comment: "管理员权限后续会补充角色名称及角色功能"
    }
  }, {
    sequelize,
    tableName: 'manager',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "_account" },
          { name: "_role" },
        ]
      },
    ]
  });
};
